%include "gen_step2_1.asm"
org 0x7c3e
bits 16
jmp 0:step1
step1:
    mov ax,cs
    mov ds,ax
    mov ss,ax
    mov es,ax
    mov fs,ax
    mov gs,ax
    mov sp,0x7c00
    mov bp,0x7c00

    mov ah,0x06 ;清屏
    mov al,0x00 ;清屏
    mov ch,0   ;左上角的行号
    mov cl,0   ;左上角的列号
    mov dh,20  ;右下角的行号
    mov dl,79  ;右下角的行号
    mov bh,0x0f;属性
    int 0x10

    xor ah,ah   ;功能号盘复位
    mov dl,0x80 ;第一个硬盘驱动器
    int 0x13
    ; push 0x0000
    ; push 0x000a
    ; push hello
    ; call logprint
    ; add sp,6


    ; push 0x8000
    ; push 0x0000
    ; call readdisk
    ; add sp,4

    call findbootbin



%include "step2_logprint.asm"
%include "step2_readdisk.asm"
%include "step2_findbootbin.asm"
; hello:
;     db "MarkJiOSKR"
times 510 - ($ - $$) db 0
dw 0xaa55
